﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using Fx.Mvc.Security.Entities;

namespace Fx.Mvc.Security.Maps
{
    public abstract class RoleMap : ClassMap<Role>
    {
        public RoleMap()
        {
            Schema("admin");
            Table("Roles");
            Id(x => x.Id).GeneratedBy.Identity();
            Map(x => x.Name).Not.Nullable();
            Map(x => x.Readable);
            Map(x => x.Writeable);
            Map(x => x.Deletable);
            Map(x => x.Active);
        }
    }
}
